package com.rongxun.utils;

import android.app.Activity;
import android.content.Intent;

import com.rongxun.hbwallet.R;


/**
 * 创建者     庄丰泽
 * 创建时间   2018/5/29 15:29
 * 描述
 */

public class ActivityUtils {

    /**
     * 带动画的启动activity
     */
    public static void startActivityForResultWithAnimotion(Activity activity, Intent intent, int requestCode) {
        activity.startActivityForResult(intent, requestCode);
        activity.overridePendingTransition(R.anim.slide_in_right, R.anim.side_out_left);
    }

    /**
     * 带动画的启动activity
     */
    public static void startActivityWithAnimotion(Activity activity, Intent intent) {
        activity.startActivity(intent);
        activity.overridePendingTransition(R.anim.slide_in_right, R.anim.side_out_left);
    }

    /**
     * 带动画的启动activity
     */
    public static void startActivityWithAnimotionBottomToTop(Activity activity, Intent intent) {
        activity.startActivity(intent);
        activity.overridePendingTransition(0, R.anim.side_out_bottom);
    }

}
